package com.cinc.ebc.quote.product.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinc.ebc.quote.product.entity.QuoteProductDetail;
import com.cinc.ebc.quote.product.entity.QuoteProductFee;
import com.cinc.ebc.quote.product.entity.QuoteProduct;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cinc.ebc.quote.product.model.QuoteProductModel;
import com.cinc.ebc.quote.product.model.QuoteProjectCustomerModel;
import com.cinc.ebc.quote.product.vo.QuoteProductRequestPage;
import com.cinc.ebc.quote.productClass.entity.QuoteProductClass;
import com.cinc.ebc.quote.project.entity.QuoteProject;
import com.cinc.mdm.modules.material.entity.MdmMaterial;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 报价产品
 * @Author: jeecg-boot
 * @Date:   2023-03-22
 * @Version: V1.0
 */
public interface IQuoteProductService extends IService<QuoteProduct> {

	/**
	 * 添加一对多
	 *
	 */
	public void saveMain(QuoteProduct quoteProduct,List<QuoteProductDetail> quoteProductDetailList,List<QuoteProductFee> quoteProductFeeList) ;

	/**
	 * 修改一对多
	 *
	 */
	public void updateMain(QuoteProduct quoteProduct,List<QuoteProductDetail> quoteProductDetailList,List<QuoteProductFee> quoteProductFeeList);

	void handleQuotePartsAsync(String quoteProductId);

	void handleQuotePartsAsync(String quoteProductId, List<String> materialIdList);

	/**
	 * 删除一对多
	 */
	public void delMain (String id);

	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 导入数据保存
	 * @param quoteProject
	 * @param projectCustomerModel
	 * @param productClassList
	 * @param productList
	 * @param productDetailList
	 * @param productMaterialList
	 * @param productDetailMaterialList
	 * @param productFeeList
	 */
    void saveQuoteProductImport(QuoteProject quoteProject, QuoteProjectCustomerModel projectCustomerModel, List<QuoteProductClass> productClassList,
								List<QuoteProduct> productList, List<QuoteProductDetail> productDetailList,
								List<MdmMaterial> productMaterialList, List<MdmMaterial> productDetailMaterialList, List<QuoteProductFee> productFeeList);

    IPage<QuoteProductModel> productPage(Page<QuoteProductModel> page, QuoteProductRequestPage quoteProductRequest);
}
